//
// Created by webturing on 2024/5/4.
//
#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'
const ll MOD = 1e9 + 7;
ll n, a[1000000], b[1000000], k;


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        b[i] = b[i - 1] ^ a[i];
    }
    cin >> k;
    ll cnt = 0;
    for (int i = 0; i <= n; i++) {
        ll y = b[i] ^ k;
        cnt += count(b + i, b + n + 1, y);
    }
    cout << cnt << endl;

    return 0;

}
